<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>userLogin</title>
    <link rel="stylesheet" th:href="@{/css/qingzhu0.css}">
    <link rel="stylesheet" th:href="@{/css/login.css}">
    <link rel="stylesheet" th:href="@{/iconfont/iconfont.css}">
    <link rel="stylesheet" th:href="@{/css/qingzhu6.css}">
    <link rel="stylesheet" th:href="@{/css/common.css}">
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
<body>
<div th:replace="common::header"></div>
<div class="outer6">
    <h4>用户登录</h4>
    <form class="layui-form" action="login.do" method="post">
        <div class="layui-form-item">
            <div class="div">
                <input type="text" name="name" lay-verify="required">
                <span id="s1">用户名</span>
            </div>
        </div>
        <div class="layui-form-item">
            <div  class="div">
                <input type="password" name="password" lay-verify="required">
                <span id="s2">登录密码</span>
            </div>
        </div>
        <div class="inter1">
            <a th:href="@{/user/toRegister.html}">注册</a>
        </div>
        <div class="layui-form-item">
            <button lay-submit lay-filter="login" type="submit" class="submit">登录</button>
        </div>
        <div class="inter1">
            <a href="/mall/admin/toLogin.html">管理员登录</a>
        </div>
    </form>
</div>
<div th:replace="common::footer"></div>
<script th:src="@{/js/青竹登录.js}"></script>
<script th:src="@{/js/jqurey.js}"></script>
<script th:src="@{/js/shop.js}"></script>
</body>
<script th:src="@{/layui/layui.js}"></script>
<script>
    layui.use('form', function () {
        var form = layui.form;
        // form.on('submit(login)', function(data){
        //     $.ajax({
        //         url: 'login.do',
        //         method:"post",
        //         data: data.field,
        //         // success: function (data) {
        //         //     layer.msg("登录成功")
        //         //     window.location.href="/mall/toIndex.html";
        //         // },
        //         error:function () {
        //             layer.msg("登录失败")
        //         }
        //     });
        // });
    });
</script>
</html>